<% content_for :css do  %>
  <%#= stylesheet_link_tag 'demo' %>
  <%= stylesheet_link_tag 'orders','tasks','orders_index','diy_datepicker' %>
<% end %>
<% content_for :js do %>
  <%= javascript_include_tag 'swfobject.js' %>
<% end %>
<% content_for :title do %>
所有预订单
<% end %>
<% content_for :help do %>
<%= link_to "帮助",help_for_first_order_step_1_orders_url, :remote => true, :method => :get, :class => :help, :id => :help_me, :title => '帮助' %>
<% end %>  
<div id="all_orders" class='grid_18 omega'>
  <%= render :partial => 'index.html', :locals => { :orders => @orders } %>
</div> 
<div id='right' class='grid_6 alpha omega'>
  <div id='tools' class='grid_6 alpha '>
    <h6>根据关键字搜索订单</h6>
    <div>
      <%= form_for :order,
            :url => order_url(:from_autocomplete),
            :html => {
              :method => :get,
              :target => :_blank
            } do |f| %>
      <%= f.autocomplete_field :buyer_full_name, autocomplete_order_info_orders_url,:id_element => '#order_id', :title => '敲回车直接打开该预订单', :onclick => 'this.select()' %><%= f.submit '', :id => 'quick_search_order',:class => 'search' %>
      <%= hidden_field_tag :order_id %>
      <% end %>
    </div>
    <div>
      <%= link_to '增加一份新订单',orders_url, :id => :new_order,:method => :post, :class => 'new_button',:target => :_blank, :title => '增加一份新订单' %>
      <%= link_to '增加一项任务',tasks_url, :id => :new_task, :class => 'new_button',:target => :_blank, :title => '增加一项任务' %>
    </div>
  </div>
  <% if Task.waiting.mine.any? %>
  <div id="my_tasks" class='grid_6 alpha'>
    <%= render :partial => 'my_tasks_in_index.html'%>
  </div>
  <% end %>
  <div id='stats' class='grid_6 alpha'>
    <%= render :partial => 'stats_in_index.html' %>
  </div>  
  <div id="supports" class='grid_6 alpha'>
    <h6>在线支持</h6>
    <div>
      <a target="_blank" href="http://wpa.qq.com/msgrd?v=3&uin=3432690&site=qq&menu=yes" title="点击这里给我发消息"><img border="0" src="http://wpa.qq.com/pa?p=2:3432690:45"/>一号</a>
    </div>
    <div>
      <a target="_blank" href="http://wpa.qq.com/msgrd?v=3&uin=7861848&site=qq&menu=yes" title="点击这里给我发消息"><img border="0" src="http://wpa.qq.com/pa?p=2:7861848:45"/>二号</a>
    </div>
    <div>
      <a target="_blank" href="http://wpa.qq.com/msgrd?v=3&uin=151430712&site=qq&menu=yes" title="点击这里给我发消息"><img border="0" src="http://wpa.qq.com/pa?p=2:151430712:45"/>三号</a>
    </div>
  </div>
</div>
<div class='clear'></div>
<% if Order.all.empty? %>
<script type="text/javascript" charset="utf-8">
  alert("欢迎您使用单易追，现在就要开始创建您的第一笔订单咯 : )");
  <%= render :file => "orders/help_for_first_order_step_1.js" %>
</script>
<% end %>